/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 38917
 * Date: 2025-03-01
 * Time: 23:44
 */
public class Sum {
    //递归求和
    public static int sum(int n){
        if (n == 1) return 1;
        return sum(n - 1) + n;
    }

    public static void main(String[] args) {
        System.out.println(sum(10));
    }
}
